package com.guigusuqi.commonutils.utils;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

/**
 * @Author:luzheng
 * @data:2023/2/26 14:42
 * @description:
 */
public class StringToDateUtils {
    public  static Date StringToDate(String s){
        if(s == null || s.length() == 0){
            return null;
        }
        SimpleDateFormat format = new SimpleDateFormat("yyyy.MM.dd");
        Date parse = null;
        try {
            parse = format.parse(s);
        } catch (ParseException e) {
            e.printStackTrace();
        }
        return parse;
    }
}
